// template/company/order/order.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    
  },

  gridBtn(e) {
    if (e.currentTarget.dataset.num == 65) {
      this.myorder();
    } else if (e.currentTarget.dataset.num == 59) {
      this.aftreserve();
    } else if (e.currentTarget.dataset.num == 77) {
      this.addorder();
    } else if (e.currentTarget.dataset.num == 82) {
      this.coact();
    } else if (e.currentTarget.dataset.num == 83) {
      this.befshipment();
    } else {
      wx.showToast({
        title: '暂未开放！',
        icon: 'error'
      })
    }
  },

  // 新增订单
  coact() {
    wx.navigateTo({
      url: '/template/company/order/coact/coact',
    })
  },

  // 新增订单
  addorder() {
    wx.navigateTo({
      url: '/template/company/addorder/addorder',
    })
  },

  // 订单详情
  myorder() {
    // wx.navigateTo({
    //   url: '/template/business/userorder/order/order',
    // })
    wx.navigateTo({
      url: '/template/company/neworder/neworder',
    })
  },

  // 已备待出清单
  aftreserve(){
    wx.navigateTo({
      url: '/template/business/storage/aftreserve/aftreserve?cardCode='+wx.getStorageSync('userInfo').CardCode
    })
  },

  // 出货计划
  befshipment(){
    wx.navigateTo({
      url: '/template/business/storage/befshipment/befshipment?cardCode='+wx.getStorageSync('userInfo').CardCode
    })
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  
})